package service.serviceImpl;


import dao.UserMapper;
import entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.UserService;


/***
 * Author: Mr.Zhao, Time: 2018/10/1/9:27
 * Description:
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userDao;

    public User login(String username, String password) {
        return userDao.selectByUsernameAndPassword(username, password);
    }

    public User selectByUsername(String username) {
        return userDao.selectByPrimaryKey(username);
    }
}
